package com.zts.util;

/**
 * Created by Zhangkh on 2017/6/1.
 */
public class IdGen {
    public static synchronized Long getId() {
        Long start = 515374539213058L; //2017-06-01 15:00:00
        Long end = System.nanoTime(); //纳秒
        return (end - start) / 1000;  //微妙
    }

    public static void main(String[] args) {
        Long a = 1496364280628L;
        System.out.println(IdGen.getId());
        System.out.println(System.currentTimeMillis() -a);
        System.out.println(System.nanoTime());
    }
}
